package Use;

import book.BookList;
import operation.IOPeration;

public abstract class User {
    protected String name;
//    此时数组并没有分配内存：
//    并且此处不进行初始化，在相应的类内部进行动态初始化
    protected IOPeration [] array;

    public User(String name) {
        this.name = name;
    }

    public abstract int menu();

    public void doWork(int choice, BookList booklist){
//        array[choice].work(booklist);
        IOPeration ioPeration = array[choice];
        ioPeration.work(booklist);
    }

}
